<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Jetson Inference: jetson-utils/videoSource.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="NVLogo_2D.jpg"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Jetson Inference
   </div>
   <div id="projectbrief">DNN Vision Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('videoSource_8h_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">videoSource.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="videoSource_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * Permission is hereby granted, free of charge, to any person obtaining a</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * copy of this software and associated documentation files (the &quot;Software&quot;),</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * to deal in the Software without restriction, including without limitation</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> * the rights to use, copy, modify, merge, publish, distribute, sublicense,</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> * and/or sell copies of the Software, and to permit persons to whom the</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> * Software is furnished to do so, subject to the following conditions:</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> * The above copyright notice and this permission notice shall be included in</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> * all copies or substantial portions of the Software.</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> * THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING</span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER</span></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> * DEALINGS IN THE SOFTWARE.</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160; </div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#ifndef __VIDEO_SOURCE_H_</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor">#define __VIDEO_SOURCE_H_</span></div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="videoOptions_8h.html">videoOptions.h</a>&quot;</span></div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="imageFormat_8h.html">imageFormat.h</a>&quot;</span>                </div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="commandLine_8h.html">commandLine.h</a>&quot;</span></div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;</div><div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="group__video.html#ga2f89bd1b25834e27c1be213ee862d5ae">   36</a></span>&#160;<span class="preprocessor">#define VIDEO_SOURCE_USAGE_STRING  &quot;videoSource arguments: \n&quot;                                                          \</span></div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="preprocessor">                  &quot;    input_URI            resource URI of the input stream, for example:\n&quot;                   \</span></div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="preprocessor">                  &quot;                             * /dev/video0              (V4L2 camera #0)\n&quot;                  \</span></div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="preprocessor">                  &quot;                             * csi://0                  (MIPI CSI camera #0)\n&quot;              \</span></div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="preprocessor">                  &quot;                             * rtp://@:1234             (RTP stream)\n&quot;                              \</span></div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="preprocessor">                  &quot;                             * rtsp://user:pass@ip:1234 (RTSP stream)\n&quot;                     \</span></div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;<span class="preprocessor">                  &quot;                             * file://my_image.jpg      (image file)\n&quot;                              \</span></div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;<span class="preprocessor">                  &quot;                             * file://my_video.mp4      (video file)\n&quot;                              \</span></div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;<span class="preprocessor">                  &quot;                             * file://my_directory/     (directory of images)\n&quot;             \</span></div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;<span class="preprocessor">                  &quot;  --input-width=WIDTH    explicitly request a width of the stream (optional)\n&quot;      \</span></div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;<span class="preprocessor">                  &quot;  --input-height=HEIGHT  explicitly request a height of the stream (optional)\n&quot;     \</span></div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;<span class="preprocessor">                  &quot;  --input-rate=RATE      explicitly request a framerate of the stream (optional)\n&quot;  \</span></div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;<span class="preprocessor">                  &quot;  --input-codec=CODEC    RTP requires the codec to be set, one of these:\n&quot;                  \</span></div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;<span class="preprocessor">                  &quot;                             * h264, h265\n&quot;                                                                 \</span></div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;<span class="preprocessor">                  &quot;                             * vp8, vp9\n&quot;                                                                   \</span></div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;<span class="preprocessor">                  &quot;                             * mpeg2, mpeg4\n&quot;                                                                       \</span></div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;<span class="preprocessor">                  &quot;                             * mjpeg\n&quot;                                                                      \</span></div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;<span class="preprocessor">                  &quot;  --input-flip=FLIP      flip method to apply to input (excludes V4L2):\n&quot;                   \</span></div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;<span class="preprocessor">                  &quot;                             * none (default)\n&quot;                                                             \</span></div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;<span class="preprocessor">                  &quot;                             * counterclockwise\n&quot;                                                           \</span></div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;<span class="preprocessor">                  &quot;                             * rotate-180\n&quot;                                                                         \</span></div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;<span class="preprocessor">                  &quot;                             * clockwise\n&quot;                                                                  \</span></div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;<span class="preprocessor">                  &quot;                             * horizontal\n&quot;                                                                         \</span></div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;<span class="preprocessor">                  &quot;                             * vertical\n&quot;                                                                   \</span></div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;<span class="preprocessor">                  &quot;                             * upper-right-diagonal\n&quot;                                                       \</span></div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;<span class="preprocessor">                  &quot;                             * upper-left-diagonal\n&quot;                                                        \</span></div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;<span class="preprocessor">                  &quot;  --input-loop=LOOP      for file-based inputs, the number of loops to run:\n&quot;               \</span></div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;<span class="preprocessor">                  &quot;                             * -1 = loop forever\n&quot;                                                          \</span></div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;<span class="preprocessor">                  &quot;                             *  0 = don&#39;t loop (default)\n&quot;                                          \</span></div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;<span class="preprocessor">                  &quot;                             * &gt;0 = set number of loops\n\n&quot;</span></div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;</div><div class="line"><a name="l00112"></a><span class="lineno"><a class="line" href="classvideoSource.html">  112</a></span>&#160;<span class="keyword">class </span><a class="code" href="classvideoSource.html">videoSource</a></div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;{</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;        <span class="keyword">static</span> <a class="code" href="classvideoSource.html">videoSource</a>* <a class="code" href="classvideoSource.html#aadf5947b119db934f02fefcd8ffe23ee">Create</a>( <span class="keyword">const</span> <a class="code" href="structvideoOptions.html">videoOptions</a>&amp; options );</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;        <span class="keyword">static</span> <a class="code" href="classvideoSource.html">videoSource</a>* <a class="code" href="classvideoSource.html#aadf5947b119db934f02fefcd8ffe23ee">Create</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="structURI.html">URI</a>, <span class="keyword">const</span> <a class="code" href="structvideoOptions.html">videoOptions</a>&amp; options=<a class="code" href="structvideoOptions.html">videoOptions</a>() );</div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;        <span class="keyword">static</span> <a class="code" href="classvideoSource.html">videoSource</a>* <a class="code" href="classvideoSource.html#aadf5947b119db934f02fefcd8ffe23ee">Create</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* URI, <span class="keyword">const</span> <a class="code" href="classcommandLine.html">commandLine</a>&amp; cmdLine );</div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;        </div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;        <span class="keyword">static</span> <a class="code" href="classvideoSource.html">videoSource</a>* <a class="code" href="classvideoSource.html#aadf5947b119db934f02fefcd8ffe23ee">Create</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* URI, <span class="keyword">const</span> <span class="keywordtype">int</span> argc, <span class="keywordtype">char</span>** argv );</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;</div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;        <span class="keyword">static</span> <a class="code" href="classvideoSource.html">videoSource</a>* <a class="code" href="classvideoSource.html#aadf5947b119db934f02fefcd8ffe23ee">Create</a>( <span class="keyword">const</span> <span class="keywordtype">int</span> argc, <span class="keywordtype">char</span>** argv, <span class="keywordtype">int</span> positionArg=-1 );</div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;</div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;        <span class="keyword">static</span> <a class="code" href="classvideoSource.html">videoSource</a>* <a class="code" href="classvideoSource.html#aadf5947b119db934f02fefcd8ffe23ee">Create</a>( <span class="keyword">const</span> <a class="code" href="classcommandLine.html">commandLine</a>&amp; cmdLine, <span class="keywordtype">int</span> positionArg=-1 );</div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;        </div><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;        <span class="keyword">virtual</span> <a class="code" href="classvideoSource.html#a2cae1095df64b7c61de77935b77032bb">~videoSource</a>();</div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;</div><div class="line"><a name="l00169"></a><span class="lineno"><a class="line" href="classvideoSource.html#ac254b0c9d38c76c62e6c5f8ad20ef447">  169</a></span>&#160;        <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classvideoSource.html#ac254b0c9d38c76c62e6c5f8ad20ef447">Usage</a>()               { <span class="keywordflow">return</span> <a class="code" href="group__video.html#ga2f89bd1b25834e27c1be213ee862d5ae">VIDEO_SOURCE_USAGE_STRING</a>; }</div><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;        </div><div class="line"><a name="l00195"></a><span class="lineno"><a class="line" href="classvideoSource.html#a872a7d5353b1cd97d02eb403ef8b57eb">  195</a></span>&#160;        <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt; <span class="keywordtype">bool</span> <a class="code" href="classvideoSource.html#a872a7d5353b1cd97d02eb403ef8b57eb">Capture</a>( T** image, uint64_t timeout=UINT64_MAX )             { <span class="keywordflow">return</span> <a class="code" href="classvideoSource.html#a872a7d5353b1cd97d02eb403ef8b57eb">Capture</a>((<span class="keywordtype">void</span>**)image, imageFormatFromType&lt;T&gt;(), timeout); }</div><div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;        </div><div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classvideoSource.html#a872a7d5353b1cd97d02eb403ef8b57eb">Capture</a>( <span class="keywordtype">void</span>** image, <a class="code" href="group__imageFormat.html#ga931c48e08f361637d093355d64583406">imageFormat</a> format, uint64_t timeout=UINT64_MAX ) = 0;</div><div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;</div><div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classvideoSource.html#aa7907ba2392b6ea5f747409d1bfbc18b">Open</a>();</div><div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;</div><div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classvideoSource.html#a19ed8f98e4ce28462296b498804005ae">Close</a>();</div><div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;</div><div class="line"><a name="l00243"></a><span class="lineno"><a class="line" href="classvideoSource.html#a0ce18fd4c3a8f934e7ec000f0d36b7e9">  243</a></span>&#160;        <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classvideoSource.html#a0ce18fd4c3a8f934e7ec000f0d36b7e9">IsStreaming</a>()<span class="keyword"> const                         </span>{ <span class="keywordflow">return</span> <a class="code" href="classvideoSource.html#a0907f7140f13fa75fef5b23a1f44b55b">mStreaming</a>; }</div><div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;</div><div class="line"><a name="l00248"></a><span class="lineno"><a class="line" href="classvideoSource.html#a17f0c43e832d4de85a014b3aa4265732">  248</a></span>&#160;        <span class="keyword">inline</span> uint32_t <a class="code" href="classvideoSource.html#a17f0c43e832d4de85a014b3aa4265732">GetWidth</a>()<span class="keyword"> const                                </span>{ <span class="keywordflow">return</span> <a class="code" href="classvideoSource.html#aa3c05686659fae747ff8709be2c9b445">mOptions</a>.<a class="code" href="structvideoOptions.html#a5c30587a874bb769d7b346ac00cff580">width</a>; }</div><div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;</div><div class="line"><a name="l00253"></a><span class="lineno"><a class="line" href="classvideoSource.html#a6ca24054da683cae18b0bfad01dbf1d0">  253</a></span>&#160;        <span class="keyword">inline</span> uint32_t <a class="code" href="classvideoSource.html#a6ca24054da683cae18b0bfad01dbf1d0">GetHeight</a>()<span class="keyword"> const                               </span>{ <span class="keywordflow">return</span> <a class="code" href="classvideoSource.html#aa3c05686659fae747ff8709be2c9b445">mOptions</a>.<a class="code" href="structvideoOptions.html#a66660b049937fd088b5ab29a0aa2187c">height</a>; }</div><div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;        </div><div class="line"><a name="l00258"></a><span class="lineno"><a class="line" href="classvideoSource.html#a4e6ac667bd17a49cc94a6b16173a06ba">  258</a></span>&#160;        <span class="keyword">inline</span> uint32_t <a class="code" href="classvideoSource.html#a4e6ac667bd17a49cc94a6b16173a06ba">GetFrameRate</a>()<span class="keyword"> const                    </span>{ <span class="keywordflow">return</span> <a class="code" href="classvideoSource.html#aa3c05686659fae747ff8709be2c9b445">mOptions</a>.<a class="code" href="structvideoOptions.html#a85ceaa18c31e939f92da06027de8dedd">frameRate</a>; }</div><div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;</div><div class="line"><a name="l00263"></a><span class="lineno"><a class="line" href="classvideoSource.html#a2052b0b41222c17e3d14964f10c3ffa6">  263</a></span>&#160;        <span class="keyword">inline</span> <span class="keyword">const</span> URI&amp; <a class="code" href="classvideoSource.html#a2052b0b41222c17e3d14964f10c3ffa6">GetResource</a>()<span class="keyword"> const                   </span>{ <span class="keywordflow">return</span> <a class="code" href="classvideoSource.html#aa3c05686659fae747ff8709be2c9b445">mOptions</a>.<a class="code" href="structvideoOptions.html#a1e904a117abb3b703f01eaed7fa305f2">resource</a>; }</div><div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;</div><div class="line"><a name="l00268"></a><span class="lineno"><a class="line" href="classvideoSource.html#a7d423829515c5c91d132f476213e22bd">  268</a></span>&#160;        <span class="keyword">inline</span> <span class="keyword">const</span> <a class="code" href="structvideoOptions.html">videoOptions</a>&amp; <a class="code" href="classvideoSource.html#a7d423829515c5c91d132f476213e22bd">GetOptions</a>()<span class="keyword"> const   </span>{ <span class="keywordflow">return</span> <a class="code" href="classvideoSource.html#aa3c05686659fae747ff8709be2c9b445">mOptions</a>; }</div><div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;</div><div class="line"><a name="l00278"></a><span class="lineno"><a class="line" href="classvideoSource.html#a76f6f92cf40ad72e9d7f76538d583e37">  278</a></span>&#160;        <span class="keyword">virtual</span> <span class="keyword">inline</span> uint32_t <a class="code" href="classvideoSource.html#a76f6f92cf40ad72e9d7f76538d583e37">GetType</a>()<span class="keyword"> const                 </span>{ <span class="keywordflow">return</span> 0; }</div><div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;</div><div class="line"><a name="l00284"></a><span class="lineno"><a class="line" href="classvideoSource.html#a0883cf58cd0d8d0c05fb192a01250b7a">  284</a></span>&#160;        <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classvideoSource.html#a0883cf58cd0d8d0c05fb192a01250b7a">IsType</a>( uint32_t type )<span class="keyword"> const               </span>{ <span class="keywordflow">return</span> (type == <a class="code" href="classvideoSource.html#a76f6f92cf40ad72e9d7f76538d583e37">GetType</a>()); }</div><div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;</div><div class="line"><a name="l00293"></a><span class="lineno"><a class="line" href="classvideoSource.html#ad3c1689db5baf2786099d2c0be075010">  293</a></span>&#160;        <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt; <span class="keywordtype">bool</span> <a class="code" href="classvideoSource.html#ad3c1689db5baf2786099d2c0be075010">IsType</a>()<span class="keyword"> const                </span>{ <span class="keywordflow">return</span> <a class="code" href="classvideoSource.html#ad3c1689db5baf2786099d2c0be075010">IsType</a>(T::Type); }</div><div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;</div><div class="line"><a name="l00298"></a><span class="lineno"><a class="line" href="classvideoSource.html#a38909f4451ecdf3a2777aea3a088677e">  298</a></span>&#160;        <span class="keyword">inline</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classvideoSource.html#a38909f4451ecdf3a2777aea3a088677e">TypeToStr</a>()<span class="keyword"> const                    </span>{ <span class="keywordflow">return</span> <a class="code" href="classvideoSource.html#a38909f4451ecdf3a2777aea3a088677e">TypeToStr</a>(<a class="code" href="classvideoSource.html#a76f6f92cf40ad72e9d7f76538d583e37">GetType</a>()); }</div><div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;</div><div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;        <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classvideoSource.html#a38909f4451ecdf3a2777aea3a088677e">TypeToStr</a>( uint32_t type );</div><div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;</div><div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;<span class="keyword">protected</span>:</div><div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;        <span class="comment">//videoSource();</span></div><div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;        <a class="code" href="classvideoSource.html#aaee65d53e3dfb3f4644608c0eebcf833">videoSource</a>( <span class="keyword">const</span> <a class="code" href="structvideoOptions.html">videoOptions</a>&amp; options );</div><div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;</div><div class="line"><a name="l00309"></a><span class="lineno"><a class="line" href="classvideoSource.html#a0907f7140f13fa75fef5b23a1f44b55b">  309</a></span>&#160;        <span class="keywordtype">bool</span>         <a class="code" href="classvideoSource.html#a0907f7140f13fa75fef5b23a1f44b55b">mStreaming</a>;</div><div class="line"><a name="l00310"></a><span class="lineno"><a class="line" href="classvideoSource.html#aa3c05686659fae747ff8709be2c9b445">  310</a></span>&#160;        <a class="code" href="structvideoOptions.html">videoOptions</a> <a class="code" href="classvideoSource.html#aa3c05686659fae747ff8709be2c9b445">mOptions</a>;</div><div class="line"><a name="l00311"></a><span class="lineno">  311</span>&#160;};</div><div class="line"><a name="l00312"></a><span class="lineno">  312</span>&#160;</div><div class="line"><a name="l00313"></a><span class="lineno">  313</span>&#160;<span class="preprocessor">#endif</span></div><div class="ttc" id="classvideoSource_html_aaee65d53e3dfb3f4644608c0eebcf833"><div class="ttname"><a href="classvideoSource.html#aaee65d53e3dfb3f4644608c0eebcf833">videoSource::videoSource</a></div><div class="ttdeci">videoSource(const videoOptions &amp;options)</div></div>
<div class="ttc" id="classvideoSource_html_a0883cf58cd0d8d0c05fb192a01250b7a"><div class="ttname"><a href="classvideoSource.html#a0883cf58cd0d8d0c05fb192a01250b7a">videoSource::IsType</a></div><div class="ttdeci">bool IsType(uint32_t type) const</div><div class="ttdoc">Check if this stream is of a particular type. </div><div class="ttdef"><b>Definition:</b> videoSource.h:284</div></div>
<div class="ttc" id="classvideoSource_html_ac254b0c9d38c76c62e6c5f8ad20ef447"><div class="ttname"><a href="classvideoSource.html#ac254b0c9d38c76c62e6c5f8ad20ef447">videoSource::Usage</a></div><div class="ttdeci">static const char * Usage()</div><div class="ttdoc">Usage string for command line arguments to Create() </div><div class="ttdef"><b>Definition:</b> videoSource.h:169</div></div>
<div class="ttc" id="classvideoSource_html_a0ce18fd4c3a8f934e7ec000f0d36b7e9"><div class="ttname"><a href="classvideoSource.html#a0ce18fd4c3a8f934e7ec000f0d36b7e9">videoSource::IsStreaming</a></div><div class="ttdeci">bool IsStreaming() const</div><div class="ttdoc">Check if the device is actively streaming or not. </div><div class="ttdef"><b>Definition:</b> videoSource.h:243</div></div>
<div class="ttc" id="classvideoSource_html_aa7907ba2392b6ea5f747409d1bfbc18b"><div class="ttname"><a href="classvideoSource.html#aa7907ba2392b6ea5f747409d1bfbc18b">videoSource::Open</a></div><div class="ttdeci">virtual bool Open()</div><div class="ttdoc">Begin streaming the device. </div></div>
<div class="ttc" id="group__video_html_ga2f89bd1b25834e27c1be213ee862d5ae"><div class="ttname"><a href="group__video.html#ga2f89bd1b25834e27c1be213ee862d5ae">VIDEO_SOURCE_USAGE_STRING</a></div><div class="ttdeci">#define VIDEO_SOURCE_USAGE_STRING</div><div class="ttdoc">Standard command-line options able to be passed to videoSource::Create() </div><div class="ttdef"><b>Definition:</b> videoSource.h:36</div></div>
<div class="ttc" id="structvideoOptions_html_a85ceaa18c31e939f92da06027de8dedd"><div class="ttname"><a href="structvideoOptions.html#a85ceaa18c31e939f92da06027de8dedd">videoOptions::frameRate</a></div><div class="ttdeci">float frameRate</div><div class="ttdoc">The framerate of the stream (the default is 30Hz). </div><div class="ttdef"><b>Definition:</b> videoOptions.h:70</div></div>
<div class="ttc" id="structURI_html"><div class="ttname"><a href="structURI.html">URI</a></div><div class="ttdoc">Resource URI of a video device, IP stream, or file/directory. </div><div class="ttdef"><b>Definition:</b> URI.h:91</div></div>
<div class="ttc" id="classvideoSource_html_a2052b0b41222c17e3d14964f10c3ffa6"><div class="ttname"><a href="classvideoSource.html#a2052b0b41222c17e3d14964f10c3ffa6">videoSource::GetResource</a></div><div class="ttdeci">const URI &amp; GetResource() const</div><div class="ttdoc">Return the resource URI of the stream. </div><div class="ttdef"><b>Definition:</b> videoSource.h:263</div></div>
<div class="ttc" id="structvideoOptions_html_a66660b049937fd088b5ab29a0aa2187c"><div class="ttname"><a href="structvideoOptions.html#a66660b049937fd088b5ab29a0aa2187c">videoOptions::height</a></div><div class="ttdeci">uint32_t height</div><div class="ttdoc">The height of the stream (in pixels). </div><div class="ttdef"><b>Definition:</b> videoOptions.h:63</div></div>
<div class="ttc" id="structvideoOptions_html"><div class="ttname"><a href="structvideoOptions.html">videoOptions</a></div><div class="ttdoc">The videoOptions struct contains common settings that are used to configure and query videoSource and...</div><div class="ttdef"><b>Definition:</b> videoOptions.h:37</div></div>
<div class="ttc" id="classvideoSource_html_a872a7d5353b1cd97d02eb403ef8b57eb"><div class="ttname"><a href="classvideoSource.html#a872a7d5353b1cd97d02eb403ef8b57eb">videoSource::Capture</a></div><div class="ttdeci">bool Capture(T **image, uint64_t timeout=UINT64_MAX)</div><div class="ttdoc">Capture the next image from the video stream. </div><div class="ttdef"><b>Definition:</b> videoSource.h:195</div></div>
<div class="ttc" id="classvideoSource_html_a4e6ac667bd17a49cc94a6b16173a06ba"><div class="ttname"><a href="classvideoSource.html#a4e6ac667bd17a49cc94a6b16173a06ba">videoSource::GetFrameRate</a></div><div class="ttdeci">uint32_t GetFrameRate() const</div><div class="ttdoc">Return the framerate, in Hz or FPS. </div><div class="ttdef"><b>Definition:</b> videoSource.h:258</div></div>
<div class="ttc" id="commandLine_8h_html"><div class="ttname"><a href="commandLine_8h.html">commandLine.h</a></div></div>
<div class="ttc" id="videoOptions_8h_html"><div class="ttname"><a href="videoOptions_8h.html">videoOptions.h</a></div></div>
<div class="ttc" id="classcommandLine_html"><div class="ttname"><a href="classcommandLine.html">commandLine</a></div><div class="ttdoc">Command line parser for extracting flags, values, and strings. </div><div class="ttdef"><b>Definition:</b> commandLine.h:35</div></div>
<div class="ttc" id="structvideoOptions_html_a5c30587a874bb769d7b346ac00cff580"><div class="ttname"><a href="structvideoOptions.html#a5c30587a874bb769d7b346ac00cff580">videoOptions::width</a></div><div class="ttdeci">uint32_t width</div><div class="ttdoc">The width of the stream (in pixels). </div><div class="ttdef"><b>Definition:</b> videoOptions.h:56</div></div>
<div class="ttc" id="classvideoSource_html_a0907f7140f13fa75fef5b23a1f44b55b"><div class="ttname"><a href="classvideoSource.html#a0907f7140f13fa75fef5b23a1f44b55b">videoSource::mStreaming</a></div><div class="ttdeci">bool mStreaming</div><div class="ttdef"><b>Definition:</b> videoSource.h:309</div></div>
<div class="ttc" id="classvideoSource_html_a2cae1095df64b7c61de77935b77032bb"><div class="ttname"><a href="classvideoSource.html#a2cae1095df64b7c61de77935b77032bb">videoSource::~videoSource</a></div><div class="ttdeci">virtual ~videoSource()</div><div class="ttdoc">Destroy interface and release all resources. </div></div>
<div class="ttc" id="classvideoSource_html_a38909f4451ecdf3a2777aea3a088677e"><div class="ttname"><a href="classvideoSource.html#a38909f4451ecdf3a2777aea3a088677e">videoSource::TypeToStr</a></div><div class="ttdeci">const char * TypeToStr() const</div><div class="ttdoc">Convert this stream&amp;#39;s class type to string. </div><div class="ttdef"><b>Definition:</b> videoSource.h:298</div></div>
<div class="ttc" id="classvideoSource_html_aa3c05686659fae747ff8709be2c9b445"><div class="ttname"><a href="classvideoSource.html#aa3c05686659fae747ff8709be2c9b445">videoSource::mOptions</a></div><div class="ttdeci">videoOptions mOptions</div><div class="ttdef"><b>Definition:</b> videoSource.h:310</div></div>
<div class="ttc" id="classvideoSource_html_ad3c1689db5baf2786099d2c0be075010"><div class="ttname"><a href="classvideoSource.html#ad3c1689db5baf2786099d2c0be075010">videoSource::IsType</a></div><div class="ttdeci">bool IsType() const</div><div class="ttdoc">Check if a this stream is of a particular type. </div><div class="ttdef"><b>Definition:</b> videoSource.h:293</div></div>
<div class="ttc" id="classvideoSource_html_a17f0c43e832d4de85a014b3aa4265732"><div class="ttname"><a href="classvideoSource.html#a17f0c43e832d4de85a014b3aa4265732">videoSource::GetWidth</a></div><div class="ttdeci">uint32_t GetWidth() const</div><div class="ttdoc">Return the width of the stream, in pixels. </div><div class="ttdef"><b>Definition:</b> videoSource.h:248</div></div>
<div class="ttc" id="classvideoSource_html_a19ed8f98e4ce28462296b498804005ae"><div class="ttname"><a href="classvideoSource.html#a19ed8f98e4ce28462296b498804005ae">videoSource::Close</a></div><div class="ttdeci">virtual void Close()</div><div class="ttdoc">Stop streaming the device. </div></div>
<div class="ttc" id="classvideoSource_html_a6ca24054da683cae18b0bfad01dbf1d0"><div class="ttname"><a href="classvideoSource.html#a6ca24054da683cae18b0bfad01dbf1d0">videoSource::GetHeight</a></div><div class="ttdeci">uint32_t GetHeight() const</div><div class="ttdoc">Return the height of the stream, in pixels. </div><div class="ttdef"><b>Definition:</b> videoSource.h:253</div></div>
<div class="ttc" id="classvideoSource_html_a7d423829515c5c91d132f476213e22bd"><div class="ttname"><a href="classvideoSource.html#a7d423829515c5c91d132f476213e22bd">videoSource::GetOptions</a></div><div class="ttdeci">const videoOptions &amp; GetOptions() const</div><div class="ttdoc">Return the videoOptions of the stream. </div><div class="ttdef"><b>Definition:</b> videoSource.h:268</div></div>
<div class="ttc" id="classvideoSource_html_a76f6f92cf40ad72e9d7f76538d583e37"><div class="ttname"><a href="classvideoSource.html#a76f6f92cf40ad72e9d7f76538d583e37">videoSource::GetType</a></div><div class="ttdeci">virtual uint32_t GetType() const</div><div class="ttdoc">Return the interface type of the stream. </div><div class="ttdef"><b>Definition:</b> videoSource.h:278</div></div>
<div class="ttc" id="imageFormat_8h_html"><div class="ttname"><a href="imageFormat_8h.html">imageFormat.h</a></div></div>
<div class="ttc" id="classvideoSource_html"><div class="ttname"><a href="classvideoSource.html">videoSource</a></div><div class="ttdoc">The videoSource API is for capturing frames from video input devices such as MIPI CSI cameras...</div><div class="ttdef"><b>Definition:</b> videoSource.h:112</div></div>
<div class="ttc" id="structvideoOptions_html_a1e904a117abb3b703f01eaed7fa305f2"><div class="ttname"><a href="structvideoOptions.html#a1e904a117abb3b703f01eaed7fa305f2">videoOptions::resource</a></div><div class="ttdeci">URI resource</div><div class="ttdoc">The resource URI of the device, IP stream, or file/directory. </div><div class="ttdef"><b>Definition:</b> videoOptions.h:49</div></div>
<div class="ttc" id="classvideoSource_html_aadf5947b119db934f02fefcd8ffe23ee"><div class="ttname"><a href="classvideoSource.html#aadf5947b119db934f02fefcd8ffe23ee">videoSource::Create</a></div><div class="ttdeci">static videoSource * Create(const videoOptions &amp;options)</div><div class="ttdoc">Create videoSource interface from a videoOptions struct that&amp;#39;s already been filled out...</div></div>
<div class="ttc" id="group__imageFormat_html_ga931c48e08f361637d093355d64583406"><div class="ttname"><a href="group__imageFormat.html#ga931c48e08f361637d093355d64583406">imageFormat</a></div><div class="ttdeci">imageFormat</div><div class="ttdoc">The imageFormat enum is used to identify the pixel format and colorspace of an image. </div><div class="ttdef"><b>Definition:</b> imageFormat.h:49</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_54a0acf6da04fe2ed9410b4c6369bc5d.html">jetson-utils</a></li><li class="navelem"><a class="el" href="videoSource_8h.html">videoSource.h</a></li>
    <li class="footer">Generated on Tue Jul 14 2020 21:59:34 for Jetson Inference by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
